#!/usr/bin/python
# -*- coding: utf-8 -*-

import MySQLdb

conn = MySQLdb.Connection("172.16.7.58", "root", "researchsucks", "X", 3306)
conn.set_character_set("utf8");
cur = conn.cursor()

file = open('/home/chaojiansong/videobook/notinsvn/video_score_list.uniq', 'r')
cnt = 0
for line in file:
    if cnt % 6 == 0:
    	cur.execute("insert ignore into pop_history(video_id) values('" + line.rstrip() + "')")
    cnt = cnt + 1

file.close()
cur.close()
conn.close()
